import request from "@/utils/request";
// 获取全部
export const getInHospitalApi = (InHospitalRequestData) => {
  return request.request({
    url: `/admin/inhospital/pages`,
    method: "POST",
    data:InHospitalRequestData,
  });
}

// 删除
export const deleteInHospitalApi = (id) => {
  return request.request({
    url: `/admin/inhospital/delete/${id}`,
    method: "get",
  });
}

//更新
export const updateInHospitalApi = (InHospitalRequestData) => {
  return request.request({
    url: `/admin/inhospital/update`,
    data:InHospitalRequestData,
    method: "post",
  });
}


//添加
export const addInHospitalApi = (InHospitalRequestData) => {
  return request.request({
    url: `/admin/inhospital/add`,
    data:InHospitalRequestData,
    method: "post",
  });
}

//出院
export const OutInHospitalApi = (id) => {
  return request.request({
    url: `/admin/inhospital/out/${id}`,
    method: "get",
  });
}

//根据id获取信息
export const GetInHospitalByIdApi = (id) => {
  return request.request({
    url: `/admin/inhospital/one/${id}`,
    method: "POST",
  });
}